<html>
<head>
	<meta charset="UTF-8">
	<title>listusers</title>
	<link rel="stylesheet" href="./assets/css/bootstrap.min.css">
</head>
<body>
		<ul class="nav nav-tabs">
  			<li role="presentation"><a href="admin.php?c=user&m=listusers">用户列表</a></li>
  			<li role="presentation"><a href="admin.php?c=user&m=regUser">用户注册</a></li>
  			<li role="presentation"><a href="admin.php?c=music&m=listmusics">视频列表</a></li>
  			<li role="presentation"><a href="admin.php?c=music&m=regmusic">添加视频</a></li>
		</ul>
		<center><h2>用户列表(系统共<?php echo count($data['users']); ?>名用户)</h2></center>
<div class="col-md-2"></div>
<div class="col-md-8 col-xs-12">
<table class="table table-hover">
<tr>
	<th>用户编号</th>
	<th>用户名</th>
	<th>性别</th>
	<th>生日</th>
	<th>爱好</th>
	<th>学历</th>
	<th>头像</th>
	<th>操作</th>
</tr>

<?php 
		foreach ($data['users'] as $row) {
			?>
			<tr>
				<td><?php echo $row['uid'];?></td>
				<td><?php echo $row['uname'];?></td>
				<td><?php 
					 if ($row['gender']==0) 
					echo "男";
					else
					echo "女";?></td>

				<td><?php echo $row['birthdate'];?></td>
				<td><?php echo $row['hobby'];?></td>
				<td><?php 
						switch ($row['degree']) {
							case '1':
								echo "高中";
								break;
							case '2':
								echo "大学";
								break;
							case '3':
								echo "研究生";
								break;
							case '4':
								echo "博士生";
								break;
							
							default:
								echo "为选择学历";
								break;
						}
				?></td>
				<td><img class="img-circle" src="./photos/<?php echo $row['pic'];?>" width="80" alt="头像" title="<?php echo $row['intro']; ?>"></td>
				<td>
					<a href="admin.php?c=user&m=edituser&uid=
					<?php echo $row['uid'];?>">修改</a> |
					<a href="admin.php?c=user&m=deluser&uid=
					<?php echo $row['uid'];?>">删除</a>
				</td>
			</tr>
		<?php
		}

 ?>
</table>
</div>




		<?php 
			//var_dump($data['users']);//显示层
 


 		?>
</body>
</html>